﻿<Controls:BorderLessWindow x:Class="myCollections.Pages.ManageCleanTitle"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Controls="clr-namespace:myCollections.Controls"
    xmlns:core="clr-namespace:System;assembly=mscorlib"
    xmlns:local="clr-namespace:myCollections.Utils"
    WindowStartupLocation="CenterScreen" Height="600" Width="500">
    <Window.Resources>
        <ObjectDataProvider x:Key="myEnum" MethodName="GetValues" ObjectType="{x:Type core:Enum}">
            <ObjectDataProvider.MethodParameters>
                <x:Type Type="local:CleanTitleType"/>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="55"/>
        </Grid.RowDefinitions>
        <DataGrid Name="dtgData" ItemsSource="{Binding}" AutoGenerateColumns="False" Background="Transparent" AlternationCount="2" Margin="0,30,0,0"
                         ColumnHeaderStyle="{DynamicResource DataGridHeaderStyle}" RowStyle="{DynamicResource DataGridRowStyle}">
                <DataGrid.Columns>
                    <DataGridTextColumn Header="{DynamicResource hedValue}" Binding="{Binding Path=Value}" Width="295"/>
                    <DataGridComboBoxColumn Header="{DynamicResource hedCategory}" ItemsSource="{Binding Source={StaticResource myEnum}}" TextBinding="{Binding Path=Category}" Width="*"/>
                </DataGrid.Columns>
            </DataGrid>
        <Grid Grid.Row="1" Background="{DynamicResource WorkBackgroundBrush}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Button x:Name="Ok" Style="{DynamicResource ButtonStyle}" Click="cmdSave_Click"  IsDefault="True" HorizontalAlignment="Right" Grid.Column="1">
                    <Button.Content>
                        <Image Source="/Images/check.png" ToolTip="Ok"/>
                    </Button.Content>
                </Button>
                <Button x:Name="Cancel" Style="{DynamicResource ButtonStyle}" Click="cmdCancel_Click"  IsCancel="True"  HorizontalAlignment="Left" Grid.Column="0">
                    <Button.Content>
                        <Image Source="/Images/cancel.png" ToolTip="Cancel"/>
                    </Button.Content>
                </Button>
            </Grid>
        </Grid>
    </Grid>
</Controls:BorderLessWindow>
